using UnityEngine;
using UFrame.CameraMotion;
using System;

// 相机
public class CameraAgent : AgentContext<CameraAgent>
{
    private CameraStateCtrl m_cameraStateCtrl = new CameraStateCtrl();
    public static Camera MainCamera => Instance.m_cameraStateCtrl.mainCamera;

    protected override void OnCreate()
    {
        base.OnCreate();
        m_cameraStateCtrl.OnRegist();
    }

    protected override void OnDestroy()
    {
        base.OnDestroy();
        m_cameraStateCtrl.OnUnRegist();
    }

    internal static void SetCameraState(int state)
    {
        Instance.m_cameraStateCtrl.SetCameraState(state);
    }
    internal static void RetreatCameraState()
    {
        Instance.m_cameraStateCtrl.RetreatCameraState();
    }
}
